home *** CD-ROM | disk | FTP | other *** search
/ Monster Media 1996 #14 / Monster Media No. 14 (April 1996) (Monster Media, Inc.).ISO / bbs_door / ant12.zip / ANTENNA.WCC < prev    next >
Text File  |  1996-01-17  |  5KB  |  111 lines

  1. 'I started out with a notion that some of my ham friends that build a lot of
  2. 'antennas might be interested in calling my BBS, plugging in the numbers and
  3. 'getting the results online. That would save them finding their calculator
  4. 'to do the math. As far as that goes the program doesn't do anything except
  5. 'to show the versatility of the wcCODE program from MSI.
  6. '
  7. '
  8. 'This software is FreeWare.... You are hearby directed to make an attempt to
  9. 'get another person interested in AMATEUR RADIO.... Then another.... Quite
  10. 'a high price.... :)
  11. '
  12. '
  13. Dim configfile as string       'antenna.cfg...should be in the dir with .WCX
  14. Dim SysopName as string        'Name will be in the header of the display file
  15. Dim BBSName as string          'Name will be in the header of the display file
  16. Dim File_Path as String        'c:\wildcat\antenna.bbs or f:\wildcat\antenna.bbs
  17. Dim Ham_Call as String         'your Amateur call
  18.                                'start sub out from center
  19. sub outfromcenter (line as integer, what as string, stcolor as string)
  20.   dim l as integer             'this is a very interesting sub
  21.   what = what + " "            'imagine that
  22.   what = left (what,int(len(what)/2)*2)
  23.   print "@NOPAUSE@"+stcolor
  24.   for l = 1 to (len(what)/2)
  25.     delay .03  'sets time delay between characters while printing out from center
  26.     locate (line,40-l)
  27.     print left(what,l);right(what,l)
  28.   next l
  29. end sub                        'end sub
  30. readconfig:                    'label
  31.    configfile = "antenna.cfg"  'default config file
  32.    if exists(progpath+configfile) then   'look for config file
  33.      open progpath+configfile for input as #2  'open file if it is there
  34.       input #2, SysopName       'else build me a new file in the right
  35.       input #2, BBSName         'directory and let me put my personal
  36.       input #2, File_Path       'information in it.
  37.       input #2, Ham_Call
  38.       close #2                  'skip this section if file found
  39.       goto 1
  40.      else
  41.       cls
  42.        print "Looking for antenna.cfg............" 'tell sysop what were doing
  43.        print
  44.        print "There appears to be no config file present"
  45.        print
  46.        print "The file is antenna.cfg and if a file of that name exist it will"
  47.        print "be overwritten. It must be in the directory with antenna.wcx"
  48.        print     'let him decide if he wants to create a new file
  49.        if inputyesno ("Do you wish to create one ") then
  50.        cls
  51.        print
  52.        print "What is the SysOp Name ?"
  53.        input "" ; SysopName
  54.        print  'personalizes the door screen with your Sysop's name
  55.        print "What is the BBS Name ?"
  56.        input "" ; BBSName
  57.        print  'personalizes the door screen with your BBS name
  58.        print "What is the path to your Display file (antenna.bbs) "
  59.        print
  60.        print "for example    C:\WILDCAT\ANTENNA.BBS"
  61.        print  'show him an example. Mine is f:\wildcat\antenna.bbs
  62.        input "" ; File_Path
  63.        print
  64.        print "Who's name should users send messages to about Ham Radio?"
  65.        input "" ; Ham_Call
  66.        open progpath+configfile for output as #2  'file exist so lets open it
  67.          print #2, SysopName  'and get this info for are Door screen
  68.          print #2, BBSName    'dito
  69.          print #2, File_Path  'dito
  70.          print #2, Ham_Call   'dito
  71.        close #2               'close it in case someone calls on the other node
  72.       else
  73.       end if
  74.     end if
  75. 1
  76. dim num3 as Real 'I would be eternally gratefull.
  77. dim ipos as integer 'insert a thing or two for sport that don't do anything
  78. Dim innum as String 'HI HI :)
  79. 10  CLS
  80. locate 1,13
  81.     print "@0B@"BBSName+" @0B@ BBS"+" @0F@  version 1.2@0B@  Sysop@0F@ "+SysopName
  82.     if ANSIDetected then DisplayTextFile(File_Path)
  83. outfromcenter (10,"This will get you in the ballpark. Final trimming will be nessassary","@0B@")
  84. locate 14,10
  85.     print"Input your frequency in megacycles... 0 to return to BBS  ";
  86.  
  87. locate 20,17
  88.     print "Ask@87@ ";Ham_Call;"@0A@ about becomming a Ham@03@"
  89. locate 14,67
  90.     input num3
  91.     if (num3)<=0 then 100 'also prevents division by zero error
  92. activitylog"----> Ran Antenna program online....." 'scribble the log
  93. cls
  94. moreprompt off
  95. locate 1,13
  96.     print "@0B@"BBSName+" @0B@ BBS"+" @0F@  version 1.2@0B@  Sysop@0F@ "+SysopName
  97.     if ANSIDetected then DisplayTextFile(File_Path)
  98. locate 10,10
  99.     print" The length should be approximatly  ";468/num3;" feet."
  100. locate 11,10
  101.     Print" or ";468/num3*12;" in."
  102. locate 13,10
  103.     Print " The length of wire in a folded dipole ";960/num3;" feet."
  104. locate 14,10
  105.     Print " or ";960/num3*12;" inches."
  106. locate 17,10
  107.     if InputYesNo("Would you like to figure another antenna? Y/N ") then goto 10
  108. 100
  109.     end
  110.   end
  111.